package com.hmsproject.datastructures.comparators;

import java.util.Comparator;

import com.hmsproject.datastructures.Hotel;

public class HotelNameComparatorAscending implements Comparator<Hotel> {

	private static HotelNameComparatorAscending hotelNameComparatorAscending = new HotelNameComparatorAscending();

	@Override
	public int compare(Hotel hotel1, Hotel hotel2) {
		return hotel1.getName().compareTo(hotel2.getName());
	}
	
	private HotelNameComparatorAscending(){
		
	}
	
	public static HotelNameComparatorAscending getInstance(){
		return hotelNameComparatorAscending;
	}	
	
}
